<template>
  <aside class="sidebar">
    <h3 class="sidebar-title">教程目录</h3>
    <div class="sidebar-section">
      <router-link to="/intro" class="sidebar-link">认识 Pinia</router-link>
      <router-link to="/define-store-options" class="sidebar-link">定义 Store</router-link>
      <router-link to="/state-options" class="sidebar-link">State</router-link>
      <router-link to="/getters-options" class="sidebar-link">Getters</router-link>
      <router-link to="/actions-options" class="sidebar-link">Actions</router-link>
    </div>
  </aside>
</template>

<style scoped>
.sidebar {
  width: 250px;
  background-color: #f5f7f9;
  padding: 20px;
  border-right: 1px solid #e5e7eb;
  height: 100%;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 600;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section h4 {
  font-size: 1rem;
  color: #42b883;
  margin-bottom: 10px;
  font-weight: 600;
}

.sidebar-link {
  display: block;
  padding: 6px 12px;
  color: #4b5563;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background-color: #e5f7ef;
  color: #42b883;
}

.sidebar-link.router-link-active {
  background-color: #e5f7ef;
  color: #42b883;
  font-weight: 500;
}
</style> 